//
//  Constants.h
//  MyProject
//
//  Created by YourName on 202X/XX/XX.
//

#pragma mark - 响应码定义

/** 请求成功 */
#define RCODE_SUCCESS               0
/** 请求失败 */
#define RCODE_FAIL                  -1
/** 服务器异常 */
#define RCODE_SERVER_ERROR          -8
/** 请求数据不存在 */
#define RCODE_NO_DATA               1
/** 网络异常 */
#define RCODE_NET_ERROR             -9

/** 请求超时时间（秒） */
#define kRequsetTimeOutSeconds      10.0

/** 应用将进入前台的通知 */
#define KNOT_APP_WILL_ENTER_FOREGROUD @"applicationWillEnterForeground"

// 根据具体业务自己定义其他响应码

#pragma mark - 联系方式定义
// 此处可以添加与联系方式相关的常量定义

#pragma mark - 接口请求URL定义
// 生产环境与开发环境的URL根地址
#if PRODUCT
// 生产环境地址
#define URL_ROOT @"https://myiot.jomoo.com.cn/appbackends/"
#else
// 开发环境地址
//#define URL_ROOT @"http://47.100.1.205/appbackends/"
#define URL_ROOT @"https://myiot.jomoo.com.cn/appbackends/"
#endif

// 用户相关接口
#define URL_USER_FEEDBACK            [URL_ROOT stringByAppendingString:@"user/feedback"]
#define URL_ACCOUNT_LOGIN            [URL_ROOT stringByAppendingString:@"login"]
#define URL_ACCOUNT_LOGIN_SMS        [URL_ROOT stringByAppendingString:@"phoneLogin"]
#define URL_ACCOUNT_LOGOUT           [URL_ROOT stringByAppendingString:@"logout"]
#define URL_ACCOUNT_USER_EXIT        [URL_ROOT stringByAppendingString:@"sso/isExistedUser"]
#define URL_ACCOUNT_REGISTER         [URL_ROOT stringByAppendingString:@"user/register"]
#define URL_ACCOUNT_GET_VERCODE      [URL_ROOT stringByAppendingString:@"captcha/getCaptcha"]
// 获取验证码(新)
#define URL_ACCOUNT_GET_VERCODEN     [URL_ROOT stringByAppendingString:@"captcha/getCaptchaN"]
#define URL_ACCOUNT_CHECK_VERCODE    [URL_ROOT stringByAppendingString:@"user/check/code"]
#define URL_ACCOUNT_CHECK_MOBILE     [URL_ROOT stringByAppendingString:@"user/check/mobile"]
#define URL_ACCOUNT_SET_PWD          [URL_ROOT stringByAppendingString:@"user/resetpass"]
#define URL_ACCOUNT_GET_USER_INFO    [URL_ROOT stringByAppendingString:@"user/getUser"]
#define URL_ACCOUNT_UPDATE_USER_INFO [URL_ROOT stringByAppendingString:@"user/update"]
#define URL_ACCOUNT_RESET_PWD        [URL_ROOT stringByAppendingString:@"sso/modifyPwd"]
#define URL_UPLOAD_USER_PHOTO        [URL_ROOT stringByAppendingString:@"user/photo"]
#define URL_FEEDBACK_COMMIT          [URL_ROOT stringByAppendingString:@"problemFeedback"]
#define URL_FEEDBACK_GET             [URL_ROOT stringByAppendingString:@"getMyFeedback"]
#define URL_USER_LOGIN               [URL_ROOT stringByAppendingString:@"supportApplication/proxy.action"]
#define URL_SYNC_DEVICE_INFO         [URL_ROOT stringByAppendingString:@"addDev"]
#define URL_HTML_VERSION_CHECK       [URL_ROOT stringByAppendingString:@"supportApplication/checkVersion.action?version="]
#define URL_STATISTICS_REPORT        [URL_ROOT stringByAppendingString:@"Statistics/report"]

// 设备相关接口
#define URL_GET_DEVICE_LIST          [URL_ROOT stringByAppendingString:@"device/getDeviceList"]
#define URL_BIND_DEVICE              [URL_ROOT stringByAppendingString:@"device/setDeviceBind"]
#define URL_UNBIND_DEVICE            [URL_ROOT stringByAppendingString:@"device/unBundleDevice"]
#define URL_SET_FILETER_TIME         [URL_ROOT stringByAppendingString:@"device/setFilterTime"]
#define URL_GET_FILETER_TIME         [URL_ROOT stringByAppendingString:@"device/getFilterTime"]

// 设备设置相关接口
#define URL_SET_DEVICE_NAME          [URL_ROOT stringByAppendingString:@"device/setDeviceName"]
#define URL_GET_THRESHOLD            [URL_ROOT stringByAppendingString:@"threshold/getThreshold"]
#define URL_SET_THRESHOLD            [URL_ROOT stringByAppendingString:@"threshold/setThreshold"]
#define URL_GET_DEVICE_PROPERTY      [URL_ROOT stringByAppendingString:@"preferences/one"]
#define URL_ADD_DEVICE_PROPERTY      [URL_ROOT stringByAppendingString:@"preferences/add"]
#define URL_DELETE_DEVICE_PROPERTY   [URL_ROOT stringByAppendingString:@"preferences/del"]
#define URL_UPDATE_DEVICE_PROPERTY   [URL_ROOT stringByAppendingString:@"preferences/update"]
#define URL_GET_PRODUCT_DETAIL       [URL_ROOT stringByAppendingString:@"product/one"]

// 日程相关接口
#define URL_GET_SCHEDULE_LIST        [URL_ROOT stringByAppendingString:@"schedule/list"]
#define URL_ADD_SCHEDULE             [URL_ROOT stringByAppendingString:@"schedule/add"]
#define URL_DELETE_SCHEDULE          [URL_ROOT stringByAppendingString:@"schedule/remove"]
#define URL_UPDATE_SCHEDULE          [URL_ROOT stringByAppendingString:@"schedule/update"]

// 浴室镜灯光控制接口
#define URL_SET_LIGHT_SWITCH         [URL_ROOT stringByAppendingString:@"light/lightSwitch"]
#define URL_SET_LIGHT_RGB            [URL_ROOT stringByAppendingString:@"light/lightTone"]
#define URL_GET_LIGHT_STATUS         [URL_ROOT stringByAppendingString:@"light/lightStatus"]

// 场景接口
#define URL_GET_SCENES_LIST          [URL_ROOT stringByAppendingString:@"scene/getSceneList"]
#define URL_GET_HOMEPAGE_SCENES_LIST [URL_ROOT stringByAppendingString:@"scene/sceneList/index"]
#define URL_SCENE_ADD                [URL_ROOT stringByAppendingString:@"scene/sceneInfo/add"]
#define URL_SCENE_DELETE             [URL_ROOT stringByAppendingString:@"scene/sceneInfo/del"]
#define URL_SCENE_UPDATE             [URL_ROOT stringByAppendingString:@"scene/sceneInfo/update"]
#define URL_SET_SCENE_LIST_INDEX_ORDER [URL_ROOT stringByAppendingString:@"scene/sceneList/index/order"]

// 首页设备设置和排序接口
#define URL_GET_DEVICE_INDEX_SORT    [URL_ROOT stringByAppendingString:@"device/getIndexSort"]
#define URL_SET_DEVICE_INDEX_SORT    [URL_ROOT stringByAppendingString:@"device/updateIndexSort"]

// 设备解绑接口
#define URL_RESET_DEVICE             [URL_ROOT stringByAppendingString:@"device/reset"]

// 健康数据接口
#define URL_HEALTH_CLAIM_LIST        [URL_ROOT stringByAppendingString:@"health/claim/list"]
#define URL_HEALTH_CLAIM_UPDATE      [URL_ROOT stringByAppendingString:@"health/claim/update"]
#define URL_HEALTH_DATA              [URL_ROOT stringByAppendingString:@"health/data"]

// 微信登录接口
#define URL_WEIXIN_GET_OPEN_ID       [URL_ROOT stringByAppendingString:@"weixin/getToken"]
#define URL_WEIXIN_GET_USER          [URL_ROOT stringByAppendingString:@"weixin/getUser"]
#define URL_WEIXIN_VERIFY_BUNDLE_USER [URL_ROOT stringByAppendingString:@"weixin/verifyBundleUser"]
#define URL_WEIXIN_RESET_BUNDLE_USER [URL_ROOT stringByAppendingString:@"weixin/resetBundleUser"]
#define URL_WEIXIN_WEIXIN_REGISTER   [URL_ROOT stringByAppendingString:@"weixin/register"]
#define URL_WEIXIN_UNBUNDLE          [URL_ROOT stringByAppendingString:@"user/unbundle"]

// 用户协议/帮助接口
#define URL_GET_AGREE_ONE            [URL_ROOT stringByAppendingString:@"pages/agreement/one"]

// 消息接口
#define URL_GET_MESSAGE_LIST         [URL_ROOT stringByAppendingString:@"message/list"]
#define URL_UPDATE_MESSAGE_STATUS    [URL_ROOT stringByAppendingString:@"message/status"]
#define URL_GET_MESSAGE_INFO         [URL_ROOT stringByAppendingString:@"message/info"]
#define URL_DELETE_MESSAGE           [URL_ROOT stringByAppendingString:@"message/del"]
#define URL_GET_UNREAD_MESSAAGE_COUNT [URL_ROOT stringByAppendingString:@"message/unread/count"]
#define URL_GET_AFTERSALE_UNREAD_MESSAAGE_COUNT [URL_ROOT stringByAppendingString:@"afterSale/countUnReadMsg"]

// 分享接口
#define URL_SHARE_GET_DEVICE_LIST    [URL_ROOT stringByAppendingString:@"device/getOwnedDevice"]
#define URL_GET_FRIEND_LIST          [URL_ROOT stringByAppendingString:@"friend/friendList"]
#define URL_GET_FRIEND_DETAIL        [URL_ROOT stringByAppendingString:@"friend/friendDetail"]
#define URL_DEVICE_SET_SHARE         [URL_ROOT stringByAppendingString:@"device/setShare"]
#define URL_ADD_FRIEND               [URL_ROOT stringByAppendingString:@"friend/addFriend"]
#define URL_DELETE_FRIEND            [URL_ROOT stringByAppendingString:@"friend/removeFriend"]
#define URL_SEARCH_FRIEND            [URL_ROOT stringByAppendingString:@"friend/searchFriend"]
#define URL_APPLY_LIST               [URL_ROOT stringByAppendingString:@"friend/applyList"]
#define URL_SET_FRIEND_REMARK        [URL_ROOT stringByAppendingString:@"friend/setFriendRemark"]
#define URL_FRIEND_SET_AGREE         [URL_ROOT stringByAppendingString:@"friend/setAgree"]
#define URL_DEVICE_GET_OWNED_FRIEND  [URL_ROOT stringByAppendingString:@"device/getOwnedFriend"]
#define URL_GET_DEVICE_SHARE_FRIENDS_NUM [URL_ROOT stringByAppendingString:@"device/getDeviceShareFriendNum"]

// 固件版本接口
#define URL_GET_FIRMWARE_LIST        [URL_ROOT stringByAppendingString:@"firmware/list"]
#define URL_GET_FIRMWARE_VERSION     [URL_ROOT stringByAppendingString:@"firmware/version"]

// 萤石摄像头token接口
#define URL_GET_YS_TOKEN             [URL_ROOT stringByAppendingString:@"ys/get/token"]

// 用水用电接口
#define URL_GET_COUNT_TELEGRAPH_CURRERNT  [URL_ROOT stringByAppendingString:@"count/telegraph/current"]
#define URL_GET_COUNT_WATER_CURRERNT      [URL_ROOT stringByAppendingString:@"count/water/current"]
#define URL_GET_COUNT_TELEGRAPH           [URL_ROOT stringByAppendingString:@"count/telegraph"]
#define URL_GET_COUNT_WATER               [URL_ROOT stringByAppendingString:@"count/water"]

// 说明书接口
#define URL_GET_PRODUCT_GUIDE_PDF_URL     [URL_ROOT stringByAppendingString:@"device/getManual"]

// 批量通过iot获取设备信息
#define URL_GET_DEVICES_BY_IOTS           [URL_ROOT stringByAppendingString:@"device/getDevicesByIots"]
// 通过identityIds获取牧云用户信息
#define URL_GET_USERS_BY_IDENTIES         [URL_ROOT stringByAppendingString:@"user/getUsersByIdenties"]

// 获取 NFC 写入内容
#define URL_NFCMGE_CREATE_SCHEMA          [URL_ROOT stringByAppendingString:@"nfcMge/createWaterPuriferSchema"]

// 获取电子说明书
#define URL_GET_FILE_BY_IOTID             [URL_ROOT stringByAppendingString:@"file/getFileByIotId"]

// 净水器设备相关接口
// 用水记录
#define URL_GET_USE_WATER_INFO            [URL_ROOT stringByAppendingString:@"waterPurifier/getWaterPurifierWithUseWaterInfo"]
// 获取安装日期
#define URL_GET_INSTALL_TIME              [URL_ROOT stringByAppendingString:@"waterPurifier/getInstallTime"]
// JFH50首页(台上)
#define URL_GET_INDEX_INFO_JFH50          [URL_ROOT stringByAppendingString:@"waterPurifier/getIndexInfoForJFH50"]
// 800G首页(厨下)
#define URL_GET_INDEX_INFO_800G           [URL_ROOT stringByAppendingString:@"waterPurifier/getIndexInfoFor800g"]
